﻿using MathNet.Spatial.Euclidean;
using System;
using System.Collections.Generic;

namespace FDEE.Model
{
    public class BPTM2S : BPTMBase
    {

        public BPTM2S(string typeName, string pierNumber,
            int height, int width, double lwidth, int calculatedHeight, int L1, int L2,
            int span) :
            base(typeName, pierNumber, height, width, lwidth, calculatedHeight, L1, L2, span)
        {
        }


        public override void SetRebarList()
        {
            RebarList = new RebarCollection();
            #region 全局钢筋数量
            int N1 = 8; // 取决于L1,L2差是否是800
            int N2 = CalculatedHeight == 800 ? 4 : 6; // CalculateHe==800;
            int N41 = 10;
            int N43 = 8;
            int N8 = 20;
            int N10 = 18;
            int N12 = 33*2;
            int N13 = 6 * 2;
            int N14 = 16;
            int N15 = 20*2;
            int N16 = 7 * 2;
            int N17 = 8;
            int N18 = 120;
            //int N19 = 12*2;
            int N19 = 18 * 2;
            int N20 = 4*2;
            #endregion
            if ((Width - 2 * 50 - 12000) / 2 + 1000 + 1400 <= 12000)
            {
                #region 1号钢筋
                double LEN1 = (Width - 2 * 50 - 12000) / 2 - 1000 + 1400;
                double LEN2 = 12000;
                double LEN3 = (Width - 2 * 50 - 12000) / 2 + 1000 + 1400;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(1, 1, "", eDB.DB25, (int)LEN1, N1, eShapeType.MA));
                RebarList.Add(new MARebarRecord(1, 2, "", eDB.DB25, (int)LEN2, N1, eShapeType.MA));
                RebarList.Add(new MARebarRecord(1, 3, "", eDB.DB25, (int)LEN3, N1, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += 3 * N1 * 2;
                #endregion


                #region 2号钢筋
                LEN1 = (Width - 2 * 50 - 12000) / 2 - 1000 + 640;
                LEN2 = 12000;
                LEN3 = (Width - 2 * 50 - 12000) / 2 + 1000 + 640;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(2, 1, "", eDB.DB16, (int)LEN1, N2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(2, 2, "", eDB.DB16, (int)LEN2, N2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(2, 3, "", eDB.DB16, (int)LEN3, N2, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB16] += 3 * N2 * 2;
                #endregion

                #region 4#
                int C = (int)Math.Round((Width - 100 - 12000) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 1, "", eDB.DB25, N41, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
                C = (int)Math.Round((Width - 100 - 12000) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 2, "", eDB.DB25, N41, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
                C = (int)Math.Round((Width - 100 - 12000) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 3, "", eDB.DB25, N43, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
                C = (int)Math.Round((Width - 100 - 12000) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 4, "", eDB.DB25, N43, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
                RebarList.Add(new MARebarRecord(4, 5, "", eDB.DB25, 12000, N41 + N43, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += 3 * (N41 + N43) * 2;
                #endregion

                #region 5# 6# 7# 
                var AA = CalculatedHeight - 2 * 50 - 16 - 25;
                var BB = L1 - 2 * 50 - 2 * 16;
                int quan = (int)Math.Round(Width / 150, MidpointRounding.AwayFromZero) + 1;
                RebarList.Add(new MCRebarRecord(5, 0, "", eDB.DB25, AA, BB, AA, quan, eShapeType.MCB));
                AA = CalculatedHeight - 2 * 50 - 25 - 25;
                RebarList.Add(new MCRebarRecord(6, 0, "", eDB.DB16, AA, BB, AA, quan, eShapeType.MCB));
                //quan = (int)Math.Round(Width / 300, MidpointRounding.AwayFromZero) + 1;
                quan = (int)(Math.Round(Width / 600, MidpointRounding.AwayFromZero) + 1) * 3;
                RebarList.Add(new MORebarRecord(7, 0, "", eDB.DB16, quan, eShapeType.MO, L1 - 2 * 50 - 2 * 16, 350));

                #endregion

                #region 8#
                LEN1 = (Width - 2 * 50 - 12000) / 2 - 1000 + 640;
                LEN2 = 12000;
                LEN3 = (Width - 2 * 50 - 12000) / 2 + 1000 + 640;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(8, 1, "", eDB.DB16, (int)LEN1, N8, eShapeType.MA));
                RebarList.Add(new MARebarRecord(8, 2, "", eDB.DB16, (int)LEN2, N8, eShapeType.MA));
                RebarList.Add(new MARebarRecord(8, 3, "", eDB.DB16, (int)LEN3, N8, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB16] += 3 * N8 * 2;
                #endregion

                #region 9#
                var LSide = 5300;// 两侧加密长度

                //quan = (int)Math.Round((4250 - 50) / 100.0, MidpointRounding.AwayFromZero) * 2 + (int)Math.Round((Width - 4250 * 2) / 250, MidpointRounding.AwayFromZero) + 1;
                quan = (int)Math.Round((4280 - 50) / 100.0, MidpointRounding.AwayFromZero) * 2 + (int)Math.Round((Width - 4280 * 2) / 150, MidpointRounding.AwayFromZero) ;
                AA = Height - 2 * 50 - 2 * 16;
                BB = L2 - 2 * 50 - 2 * 16;
                RebarList.Add(new MORebarRecord(9, 1, "", eDB.DB16, quan, eShapeType.MO, AA, BB));
                //RebarList.Add(new MORebarRecord(9, 2, "", eDB.DB16, quan, eShapeType.MO90, AA, 2 * 270 + 120));
                RebarList.Add(new MORebarRecord(9, 2, "", eDB.DB16, quan, eShapeType.MO, AA, 130 * 4 + 25));
                #endregion

                #region 10#
                LEN1 = (Width - 2 * 50 - 12000) / 2 - 1000 + 1400;
                LEN3 = 12000;
                LEN2 = (Width - 2 * 50 - 12000) / 2 + 1000 + 1400;

                RebarList.Add(new MARebarRecord(10, 1, "", eDB.DB25, (int)LEN1, N10, eShapeType.MA));
                RebarList.Add(new MARebarRecord(10, 2, "", eDB.DB25, (int)LEN2, N10, eShapeType.MA));
                RebarList.Add(new MARebarRecord(10, 3, "", eDB.DB25, (int)LEN3, N10, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += 3 * (N10) * 2;
                #endregion

                #region 12#-17#

                int BlockThick = 200;

                AA = 1500 - 50;
                BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
                BB = 294;
                RebarList.Add(new MCRebarRecord(12, 0, "", eDB.DB12, AA, BB, AA, N12, eShapeType.MCB));
                //RebarList.Add(new MURebarRecord(13, 0, "", eDB.DB25, N13, eShapeType.MUR, 750, Height - 100, 1000, 109, 75));
                RebarList.Add(new MURebarRecord(13, 0, "", eDB.DB25, N13, eShapeType.MUR, 1450, Height - 100, 1450, 109, 75));
                AA = Height - 2 * 50;
                BB = BlockThick - 2 * 50 - 2 * 12;
                RebarList.Add(new MCRebarRecord(14, 0, "", eDB.DB12, AA, BB, AA, N14, eShapeType.MCB));
                AA = BlockThick - 2 * 50 - 2 * 12;
                BB = (int)Math.Round((L1 - L2) * 0.5 - 2 * 50 - 2 * 12, MidpointRounding.AwayFromZero);
                RebarList.Add(new MORebarRecord(15, 0, "", eDB.DB12, N15, eShapeType.MO, AA, BB));
                AA = Height - 100 - 2 * 12;
                BB = 1200 - 2 * 50 - 2 * 12;
                RebarList.Add(new MORebarRecord(16, 0, "", eDB.DB12, N16, eShapeType.MO, AA, BB));
                RebarList.Add(new MORebarRecord(17, 0, "", eDB.DB12, N17, eShapeType.MO, AA, BB));
                #endregion

                #region 18#
                AA = L2 - 2 * 50;
                RebarList.Add(new MCRebarRecord(18, 0, "", eDB.DB12, AA, 500, AA, N18, eShapeType.MCR));

                AA = 1500 - 50;
                BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
                BB = 294;
                RebarList.Add(new MCRebarRecord(19, 0, "", eDB.DB12, AA, BB, AA, N19, eShapeType.MCT));
                //AA = Height - 100 - 2 * 50;
                AA = Height - 2 * 50;
                RebarList.Add(new MARebarRecord(20, 0, "", eDB.DB12, AA, N20, eShapeType.MA));
                #endregion
            }
            else
            {
                #region 1号钢筋
                double LEN1 = (Width - 2 * 50 - 12000 * 2 + 1400) / 2 - 1000 + 1400;
                double LEN2 = 12000;
                double LEN3 = (Width - 2 * 50 - 12000 * 2 + 1400) / 2 + 1000 + 1400;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(1, 1, "", eDB.DB25, (int)LEN1, N1, eShapeType.MA));
                RebarList.Add(new MARebarRecord(1, 2, "", eDB.DB25, (int)LEN2, N1*2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(1, 3, "", eDB.DB25, (int)LEN3, N1, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += (3+1) * N1 * 2;
                #endregion


                #region 2号钢筋
                LEN1 = (Width - 2 * 50  - 12000 * 2 + 640) / 2 - 1000 + 640;
                LEN2 = 12000;
                LEN3 = (Width - 2 * 50 - 12000 * 2 + 640) / 2 + 1000 + 640;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(2, 1, "", eDB.DB16, (int)LEN1, N2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(2, 2, "", eDB.DB16, (int)LEN2, N2*2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(2, 3, "", eDB.DB16, (int)LEN3, N2, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB16] += (3+1) * N2 * 2;
                #endregion

                #region 4#
                int C = (int)Math.Round((Width - 100 - 12000 * 2 + 980) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 1, "", eDB.DB25, N41, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
                C = (int)Math.Round((Width - 100 - 12000 * 2 + 980) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 2, "", eDB.DB25, N41, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
                C = (int)Math.Round((Width - 100 - 12000 * 2 + 980) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 3, "", eDB.DB25, N43, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
                C = (int)Math.Round((Width - 100 - 12000 * 2 + 980) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
                RebarList.Add(new MURebarRecord(4, 4, "", eDB.DB25, N43, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
                RebarList.Add(new MARebarRecord(4, 5, "", eDB.DB25, 12000, (N41 + N43)*2, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += (3+1) * (N41 + N43) * 2;
                #endregion

                #region 5# 6# 7# 
                var AA = CalculatedHeight - 2 * 50 - 16 - 25;
                var BB = L1 - 2 * 50 - 2 * 16;
                int quan = (int)Math.Round(Width / 150, MidpointRounding.AwayFromZero) + 1;
                RebarList.Add(new MCRebarRecord(5, 0, "", eDB.DB25, AA, BB, AA, quan, eShapeType.MCB));
                AA = CalculatedHeight - 2 * 50 - 25 - 25;
                RebarList.Add(new MCRebarRecord(6, 0, "", eDB.DB16, AA, BB, AA, quan, eShapeType.MCB));
                //quan = (int)Math.Round(Width / 300, MidpointRounding.AwayFromZero) + 1;
                quan = (int)(Math.Round(Width / 600, MidpointRounding.AwayFromZero) + 1) * 3;
                RebarList.Add(new MORebarRecord(7, 0, "", eDB.DB16, quan, eShapeType.MO, L1 - 2 * 50 - 2 * 16, 350));

                #endregion

                #region 8#
                LEN1 = (Width - 2 * 50 - 12000 * 2 + 640) / 2 - 1000 + 640;
                LEN2 = 12000;
                LEN3 = (Width - 2 * 50 - 12000 * 2 + 640) / 2 + 1000 + 640;
                if (LEN1 > 12000 || LEN3 > 12000)
                {
                    throw new Exception("钢筋超过定尺");
                }
                RebarList.Add(new MARebarRecord(8, 1, "", eDB.DB16, (int)LEN1, N8, eShapeType.MA));
                RebarList.Add(new MARebarRecord(8, 2, "", eDB.DB16, (int)LEN2, N8*2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(8, 3, "", eDB.DB16, (int)LEN3, N8, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB16] += (3+1) * N8 * 2;
                #endregion

                #region 9#
                var LSide = 5300;// 两侧加密长度

                //quan = (int)Math.Round((4250 - 50) / 100.0, MidpointRounding.AwayFromZero) * 2 + (int)Math.Round((Width - 4250 * 2) / 250, MidpointRounding.AwayFromZero) + 1;
                quan = (int)Math.Round((4250 - 50) / 100.0, MidpointRounding.AwayFromZero) * 2 + (int)Math.Round((Width - 4250 * 2) / 150, MidpointRounding.AwayFromZero) ;
                AA = Height - 2 * 50 - 2 * 16;
                BB = L2 - 2 * 50 - 2 * 16;
                RebarList.Add(new MORebarRecord(9, 1, "", eDB.DB16, quan, eShapeType.MO, AA, BB));
                //RebarList.Add(new MORebarRecord(9, 2, "", eDB.DB16, quan, eShapeType.MO90, AA, 2 * 270 + 120));
                RebarList.Add(new MORebarRecord(9, 2, "", eDB.DB16, quan, eShapeType.MO, AA, 130 * 4 + 25));
                #endregion

                #region 10#
                LEN1 = (Width - 2 * 50 - 12000 * 2 + 1400) / 2 - 1000 + 1400;
                LEN3 = 12000;
                LEN2 = (Width - 2 * 50 - 12000 * 2 + 1400) / 2 + 1000 + 1400;

                RebarList.Add(new MARebarRecord(10, 1, "", eDB.DB25, (int)LEN1, N10, eShapeType.MA));
                RebarList.Add(new MARebarRecord(10, 2, "", eDB.DB25, (int)LEN2, N10*2, eShapeType.MA));
                RebarList.Add(new MARebarRecord(10, 3, "", eDB.DB25, (int)LEN3, N10, eShapeType.MA));
                UboltList.UBoltNum[eDB.DB25] += (3+1) * (N10) * 2;
                #endregion

                #region 12#-17#

                int BlockThick = 200;

                AA = 1500 - 50;
                BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
                BB = 294;
                RebarList.Add(new MCRebarRecord(12, 0, "", eDB.DB12, AA, BB, AA, N12, eShapeType.MCB));
                //RebarList.Add(new MURebarRecord(13, 0, "", eDB.DB25, N13, eShapeType.MUR, 750, Height - 100, 1000, 109, 75));
                RebarList.Add(new MURebarRecord(13, 0, "", eDB.DB25, N13, eShapeType.MUR, 1450, Height - 100, 1450, 109, 75));
                AA = Height - 2 * 50;
                BB = BlockThick - 2 * 50 - 2 * 12;
                RebarList.Add(new MCRebarRecord(14, 0, "", eDB.DB12, AA, BB, AA, N14, eShapeType.MCB));
                AA = BlockThick - 2 * 50 - 2 * 12;
                BB = (int)Math.Round((L1 - L2) * 0.5 - 2 * 50 - 2 * 12, MidpointRounding.AwayFromZero);
                RebarList.Add(new MORebarRecord(15, 0, "", eDB.DB12, N15, eShapeType.MO, AA, BB));
                AA = Height - 100 - 2 * 12;
                BB = 1200 - 2 * 50 - 2 * 12;
                RebarList.Add(new MORebarRecord(16, 0, "", eDB.DB12, N16, eShapeType.MO, AA, BB));
                RebarList.Add(new MORebarRecord(17, 0, "", eDB.DB12, N17, eShapeType.MO, AA, BB));
                #endregion

                #region 18#
                AA = L2 - 2 * 50;
                RebarList.Add(new MCRebarRecord(18, 0, "", eDB.DB12, AA, 500, AA, N18, eShapeType.MCR));

                AA = 1500 - 50;
                BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
                BB = 294;
                RebarList.Add(new MCRebarRecord(19, 0, "", eDB.DB12, AA, BB, AA, N19, eShapeType.MCT));
                //AA = Height - 100 - 2 * 50;
                AA = Height - 2 * 50;
                RebarList.Add(new MARebarRecord(20, 0, "", eDB.DB12, AA, N20, eShapeType.MA));
                #endregion
            }
        }

        public override void SetTendonList(ref System.Data.DataTable ElongTable)
        {
            TendonDistribute = new RebarTendonDistribute(320, new List<double>() { 435, 435 });
            List<Point2D> V1 = new List<Point2D>();
            List<Point2D> V2 = new List<Point2D>();
            List<Point2D> V3 = new List<Point2D>();
            List<Point2D> V4 = new List<Point2D>();
            List<Point2D> V5 = new List<Point2D>();
            // 缩放计算
            double factor = (Width) * 0.5 / 14300;
            if (Width >= 28.6 * 1000)
            {
                V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(14.3,0.6),
                new Point2D(6.8,1.108),};

                V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(14.3,0.4),
                new Point2D(6.8,0.826),};

                V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(14.3,0.4),
                new Point2D(6.8,0.689),};

                V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(14.3,0.2),
                new Point2D(6.8,0.406),};

                V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(14.3,0.2),
                new Point2D(6.8,0.269),};
            }
            else
            {
                V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(14.3*factor,0.6),
                new Point2D(6.8*factor,1.108),};

                V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(14.3*factor,0.4),
                new Point2D(6.8*factor,0.826),};

                V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(14.3*factor,0.4),
                new Point2D(6.8*factor,0.689),};

                V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(14.3*factor,0.2),
                new Point2D(6.8*factor,0.406),};

                V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(14.3*factor,0.2),
                new Point2D(6.8*factor,0.269),};

                ;

                if (PierNumber == "P-298")
                {
                    V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(12.576,0.6),
                new Point2D(6.681,1.108),};

                    V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(12.576,0.4),
                new Point2D(6.681,0.826),};

                    V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(12.576,0.4),
                new Point2D(6.681,0.689),};

                    V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(12.576,0.2),
                new Point2D(6.681,0.406),};

                    V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(12.576,0.2),
                new Point2D(6.681,0.269),};
                }
                else if (PierNumber == "P-294")
                {
                    V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(12.352,0.6),
                new Point2D(6.562,1.108),};

                    V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(12.352,0.4),
                new Point2D(6.562,0.826),};

                    V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(12.352,0.4),
                new Point2D(6.562,0.689),};

                    V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(12.352,0.2),
                new Point2D(6.562,0.406),};

                    V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(12.352,0.2),
                new Point2D(6.562,0.269),};
                }
                else if (PierNumber == "P-409")
                {
                    V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(12.062,0.6),
                new Point2D(6.408,1.108),};

                    V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(12.062,0.4),
                new Point2D(6.408,0.826),};

                    V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(12.062,0.4),
                new Point2D(6.408,0.689),};

                    V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(12.062,0.2),
                new Point2D(6.408,0.406),};

                    V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(12.062,0.2),
                new Point2D(6.408,0.269),};
                }
                else if (PierNumber == "P-410")
                {
                    V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(12.062,0.6),
                new Point2D(6.408,1.108),};

                    V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(12.062,0.4),
                new Point2D(6.408,0.826),};

                    V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(12.062,0.4),
                new Point2D(6.408,0.689),};

                    V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(12.062,0.2),
                new Point2D(6.408,0.406),};

                    V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(12.062,0.2),
                new Point2D(6.408,0.269),};
                }
                else if (PierNumber == "P-411")
                {
                    V1 = new List<Point2D>(){
                new Point2D(0,2.247),
                new Point2D(12.084,0.6),
                new Point2D(6.420,1.108),};

                    V2 = new List<Point2D>(){
                new Point2D(0,1.780),
                new Point2D(12.084,0.4),
                new Point2D(6.420,0.826),};

                    V3 = new List<Point2D>(){
                new Point2D(0,1.335),
                new Point2D(12.084,0.4),
                new Point2D(6.420,0.689),};

                    V4 = new List<Point2D>(){
                new Point2D(0,0.868),
                new Point2D(12.084,0.2),
                new Point2D(6.420,0.406),};

                    V5 = new List<Point2D>(){
                new Point2D(0,0.423),
                new Point2D(12.084,0.2),
                new Point2D(6.420,0.269),};
                }
            }
            TendonList.Add(new CSCTendonRecord(1, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V1[1].X, V1[0], V1[1], V1[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(2, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V1[1].X, V1[0], V1[1], V1[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(3, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V1[1].X, V1[0], V1[1], V1[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(4, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V2[1].X, V2[0], V2[1], V2[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(5, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V2[1].X, V2[0], V2[1], V2[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(6, 1, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V2[1].X, V2[0], V2[1], V2[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(7, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V3[1].X, V3[0], V3[1], V3[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(8, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V3[1].X, V3[0], V3[1], V3[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(9, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V3[1].X, V3[0], V3[1], V3[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(10, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V4[1].X, V4[0], V4[1], V4[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(11, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V4[1].X, V4[0], V4[1], V4[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(12, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V4[1].X, V4[0], V4[1], V4[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(13, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V5[1].X, V5[0], V5[1], V5[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(14, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V5[1].X, V5[0], V5[1], V5[2]), ref ElongTable);
            TendonList.Add(new CSCTendonRecord(15, 2, eStrandClass.S152, 22, eForceType.OneEnd, 4351, Width * 1e-3 - 2 * V5[1].X, V5[0], V5[1], V5[2]), ref ElongTable);


        }
    }
}
